Fix valgrind warning about uninitialized value
authorCarlos Garnacho <carlosg@gnome.org>
Sun, 23 Jan 2011 22:09:58 +0000 (23:09 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sun, 23 Jan 2011 22:14:53 +0000 (23:14 +0100)
mods_state->effective is not being set in XIQueryPointer() currently, so
use base|latched|locked instead, effective is nothing else than a shorthand
for these ORs, and these 3 values are set correctly anytime.

gdk/x11/gdkdevice-xi2.c

index 78b9de693a5c4a3f0cfe8e35be2a00271d20c88a..24699bfa391427860f30ff63abe9f372c94ac1aa 100644 (file)
@@ -677,7 +677,7 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
   guint state = 0;
 
   if (mods_state)
-    state = (guint) mods_state->effective;
+    state = (guint) mods_state->base | mods_state->latched | mods_state->locked;
 
   if (buttons_state)
     {